package view;

import java.awt.Dimension;
import java.awt.event.ActionEvent;

import javax.swing.JButton;

import javax.swing.WindowConstants;
import org.jdesktop.application.Application;

import javax.swing.AbstractAction;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class PanelModifProv extends javax.swing.JPanel {

	private static PanelModifProv instancia;
	private JLabel jLabelModifProv;
	private JButton jButtonCancelar;
	private AbstractAction actionCancelar;
	private JButton jButtonBuscar;
	private JTextField jTextFieldIDProv;
	private JLabel jLabelIDProv;

	public static PanelModifProv getInstancia(){
		if(instancia==null){
			instancia=new PanelModifProv();
		}
		return instancia;
	}
	
	private PanelModifProv() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setSize(400, 219);
			this.setLayout(null);
			this.add(getJButtonCancelar());
			this.add(getJLabelModifProv());
			this.add(getJLabelIDProv());
			this.add(getJTextFieldIDProv());
			this.add(getJButtonBuscar());
			Application.getInstance().getContext().getResourceMap(getClass()).injectComponents(this);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private JButton getJButtonCancelar() {
		if(jButtonCancelar == null) {
			jButtonCancelar = new JButton();
			jButtonCancelar.setBounds(267, 179, 87, 21);
			jButtonCancelar.setName("jButtonCancelar");
			jButtonCancelar.setAction(getActionCancelar());
		}
		return jButtonCancelar;
	}
	
	private JLabel getJLabelModifProv() {
		if(jLabelModifProv == null) {
			jLabelModifProv = new JLabel();
			jLabelModifProv.setBounds(133, 21, 127, 14);
			jLabelModifProv.setName("jLabelModifProv");
		}
		return jLabelModifProv;
	}
	

    private AbstractAction getActionCancelar() {
		if(actionCancelar == null) {
			actionCancelar = new AbstractAction("Cancelar", null) {
				public void actionPerformed(ActionEvent evt) {
					instancia.setVisible(false);
				}
			};
		}
		return actionCancelar;
    }
    
    private AbstractAction getActionBuscarProv() {
		if(actionCancelar == null) {
			actionCancelar = new AbstractAction("Cancelar", null) {
				public void actionPerformed(ActionEvent evt) {
					//TBD
				}
			};
		}
		return actionCancelar;
    }
    
    private JLabel getJLabelIDProv() {
    	if(jLabelIDProv == null) {
    		jLabelIDProv = new JLabel();
    		jLabelIDProv.setBounds(47, 48, 98, 14);
    		jLabelIDProv.setName("jLabelIDProv");
    	}
    	return jLabelIDProv;
    }
    
    private JTextField getJTextFieldIDProv() {
    	if(jTextFieldIDProv == null) {
    		jTextFieldIDProv = new JTextField();
    		jTextFieldIDProv.setBounds(157, 45, 73, 21);
    	}
    	return jTextFieldIDProv;
    }
    
    private JButton getJButtonBuscar() {
    	if(jButtonBuscar == null) {
    		jButtonBuscar = new JButton();
    		jButtonBuscar.setBounds(247, 45, 81, 21);
    		jButtonBuscar.setName("jButtonBuscar");
    		jButtonBuscar.setAction(getActionBuscarProv());
    	}
    	return jButtonBuscar;
    }
    
    
    

}
